global theFirstBuildingChannel, theLastBuildingChannel, theFirstShipChannel, theBackgroundVelocity, theOtherShipVelocity
repeat with h = theFirstBuildingChannel to theLastBuildingChannel
if sprite h intersects theFirstShipChannel then
if ((theBackgroundVelocity < 0) and (the left of sprite theFirstShipChannel < the left of sprite h)) or ((theBackgroundVelocity > 0) and (the right of sprite theFirstShipChannel > the right of sprite h)) then
PlayBounceSound()
set theBackgroundVelocity to -theBackgroundVelocity